<extend name="./Template/Admin/Common/panel-block.html"/>
<block name="body">
    <form action="{:U('')}" class="layui-form layui-clear" method="post" ajaxSubmit>
        <div class="layui-row pb10 pl5">
            标题
        </div>
        <div class="layui-col-md8 p5">
            <div class="layui-form-item">
                <div class="layui-row">
                    <input class="layui-input" placeholder="文章标题" value="{$info.title}" name="title"/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-row pb10">
                    正文
                </div>
                <div class="layui-row">
                    {:W('Common/Form/editor',['name'=>'content', 'value'=>$info['content']])}
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-row pb10">
                    封面上传
                </div>
                <div class="layui-row">
                    {:W('Common/Form/uploader',['name'=>'cover', 'value'=>$info['cover'], 'from'=>'blog_addon','option'=>['list-type'=>'picture','limit'=>1]])}
                </div>
            </div>
        </div>
        <div class="layui-col-md4 pt5">
            <div class="layui-form-item">
                <label class="layui-form-label">分类</label>
                <div class="layui-input-block">
                    <Html:select name="category_id" options="cate" selected="info['category_id']"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <Html:select name="status" options="status" selected="info['status']"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">推荐</label>
                <div class="layui-input-block">
                    <Html:select name="is_rec" options="rec" selected="info['is_rec']"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">日期</label>
                <div class="layui-input-block">
                    <input name="post_date" class="layui-input" role="date" value="<notempty name='info.post_date'>{$info.post_date}<else/>{:date('Y-m-d H:i:s')}</notempty>" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">作者</label>
                <div class="layui-input-block">
                    <div class="layui-form-mid">
                        {$_me['nickname']}
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <input type="hidden" name="id" value="{$info.id}" />
                    <button class="layui-btn layui-btn-primary layui-btn-fluid">提交</button>
                </div>
            </div>
        </div>
    </form>
</block>
